package com.fz.common;

/**
 * 业务码
 * @param
 * @author fh
 * @date 2020/6/29
 * @return
 */
public enum ResultCode {


    UNAUTHORIZED(401, "未授权"),

    SERVER_ERROR(500, "服务器异常"),

    OPERATION_SUCCESS(200, "操作成功"),

    ERROR(201, "系统错误"),

    NOT_LOGGED_IN(202, "未登录,请先登录"),

    PARAM_NULL(203, "参数为空"),

    PARAM_ERROR(204, "参数异常"),

    DATA_NOT_FOUND(205, "没有找到数据"),

    SAVE_ERROR(206, "保存失败"),

    INVALID(207, "非法操作"),

    OFF_SITE_LOGIN(208, "您的账号已在其它地方登陆，若不是本人操作，请注意账号安全！"),
    NO_PERMISSION(209,"无权限访问"),

    NO_EXIT_USER(501, "用户不存在"),
    PWD_ERROR(502, "密码错误"),


    USER_DISABLE(503,"用户已被禁用"),

    CODE_NOEXIT_EXPIRE(504,"验证码不存在或已过期"),
    CODE_ERROR(505,"验证码错误"),
    PWD_CON_ERROR(506,"密码连续错误5次，账号被锁定。请联系管理员。"),

    MSG_CODE_ERROR(507,"短信验证码错误"),

    SEND_REQUEST_ERROR(508,"发送GET请求出现异常"),
    GET_UNION_ID_ERROR(509,"授权获取unionid失败"),
    NO_UNION_ID_ERROR(510,"授权登录无unionid，丢失登录凭证"),
    LOGIN_AUTH_ERROR(511,"授权登录失败"),
    MSG_OFTEN_ERROR(512,"请勿频繁发送短信验证码");

    private Integer resultCode;


    private String message;

    ResultCode(Integer resultCode, String message) {
        this.resultCode = resultCode;
        this.message = message;
    }

    public Integer getResultCode() {
        return resultCode;
    }

    public void setResultCode(Integer resultCode) {
        this.resultCode = resultCode;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String desc) {
        this.message = message;
    }}
